﻿
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace DevelopTools
{
    /// <summary>
    /// 测试类
    /// </summary>
    public class TestShowUI : MonoBehaviour
    {
        void Start()
        {
            //获取控制器
            controller = GetComponent<DataShowController>();
        }
        private DataShowController controller;
        void Update()
        {
            ControlTrigger();
        }
        /// <summary>
        /// 控制的触发方法，在此处调用
        ///     本例中为PC端
        /// </summary>
        private void ControlTrigger()
        {
            if (Cursor.visible == false)
                return;
            //1.打开UI
            if (Input.GetMouseButtonDown(0))
            {
                controller.OpenUI();
            }
            //2.关闭UI
            if (Input.GetMouseButtonDown(1))
            {
                controller.CloseUI();
            }
        }
    }
}